﻿using UnityEngine;
using System.Collections;

public class MenuGui : MonoBehaviour {
	float buttonSize = 200;
	float buttonGap = 10;

	// Use this for initialization
	void OnGUI() {
		Texture Menu1 = Resources.Load("MenuChoice1") as Texture;
		Texture Menu2 = Resources.Load("MenuChoice2") as Texture;
		Texture Menu3 = Resources.Load("ManuChoice3") as Texture;
		GUI.Box(new Rect(5,5,Screen.width-10,Screen.height-10), "Pick a Fukkin Level");	
		GUI.Box(new Rect( (Screen.width/2)-buttonSize-buttonGap - 15, (Screen.height-15)-(buttonSize/2) - 25,(Screen.height-15)-(buttonSize/2) + 15 ,(Screen.height-15)+15 ),"Choose a texture");
		//Load Level 1 (Zaks Level)
		if(GUI.Button (new Rect ((float)((Screen.width/2)+buttonGap), (float)((Screen.height/2)-(buttonSize/2)), (float)buttonSize,(float)buttonSize), "Zaks Level")) {
			Application.LoadLevel ("scene1");
		}
		
		//Load Level 2 (Nicks Level)
		if (GUI.Button (new Rect((float)((Screen.width/2)-buttonSize-buttonGap), (float)((Screen.height/2)-(buttonSize/2)), (float)buttonSize,(float)buttonSize), "Nicks Level")) {
			Application.LoadLevel ("minigame");
		}

		if (GUI.Button (new Rect((float)((Screen.width/2)-buttonSize-buttonGap), (float)((Screen.height-15)-(buttonSize/2)), (float)buttonSize/2,(float)buttonSize/2), Menu1)) {
			PlayerPrefs.SetInt("Texture", 1);

		}
		if (GUI.Button (new Rect((float)((Screen.width/2)-(buttonSize/4)), (float)((Screen.height-15)-(buttonSize/2)), (float)buttonSize/2,(float)buttonSize/2), Menu2)) {
			PlayerPrefs.SetInt("Texture", 2);

		}
		if (GUI.Button (new Rect((float)((Screen.width/2)+(buttonSize/2)+buttonGap), (float)((Screen.height-15)-(buttonSize/2)), (float)buttonSize/2,(float)buttonSize/2), Menu3)) {
			PlayerPrefs.SetInt("Texture", 3);

		}
	}
}
